package org.idea.qiyu.live.framework.redis.starter.key;

import org.idea.qiyu.live.framework.redis.starter.key.common.RedisKeyBuilder;
import org.idea.qiyu.live.framework.redis.starter.key.common.RedisKeyLoadMatch;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

@Configuration
@Conditional(RedisKeyLoadMatch.class)
public class ImProviderCacheKeyBuilder extends RedisKeyBuilder {

    private static final String IM_TOKEN_KEY = "ImToken";

    public String buildImTokenKey(String token) {
        //qiyu-live-account-provider:token:phone
        return super.getPrefix() + IM_TOKEN_KEY + super.getSplitItem() + token;
    }
}